(font-lock-set-defaults): Handle shell mode.
authorRichard M. Stallman <rms@gnu.org>
Tue, 1 Feb 1994 23:10:41 +0000 (23:10 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 1 Feb 1994 23:10:41 +0000 (23:10 +0000)
(shell-font-lock-keywords): New variable.

lisp/font-lock.el

index d0c042d39d3031604bfe5bbca8c7dc3e3ef5f3c8..27538a8f532bca73eb4b7c35ebb07a0fb2c22d12 100644 (file)
@@ -437,6 +437,7 @@ This can take a while for large buffers."
                  ((eq major-mode 'perl-mode)       perl-font-lock-keywords)
                  ((eq major-mode 'tex-mode)        tex-font-lock-keywords)
                  ((eq major-mode 'texinfo-mode)    texi-font-lock-keywords)
+                 ((eq major-mode 'shell-mode)      shell-font-lock-keywords)
                  (t nil)))))
 
 (defconst lisp-font-lock-keywords-1
@@ -635,6 +636,15 @@ This does a lot more highlighting.")
    )
   "Additional expressions to highlight in TeXinfo mode.")
 
+(defvar shell-font-lock-keywords
+  (list (cons shell-prompt-pattern 'font-lock-keyword-face)
+       (list (concat shell-prompt-pattern "\\([^ \t]+\\)")
+             1 'font-lock-function-name-face)
+       '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face)
+       '("^[^ \t]+:.*$" . font-lock-string-face)
+       '("^\\[[1-9][0-9]*\\]" . font-lock-string-face))
+  "Additional expressions to highlight in TeXinfo mode.")
+
 (provide 'font-lock)
 
 ;;; font-lock.el ends here